function searchByOnline(state){
	window.location.href = "/wgcloud/dceInfo/list?heathStatus="+state;
}
function add() {
	window.location.href = "/wgcloud/dceInfo/edit";
}

function view(id) {
	window.location.href = "/wgcloud/dceInfo/view?id="+id;
}


function viewDate(id,dates){
	window.location.href = "/wgcloud/dceInfo/view?id="+id+"&date="+dates;
}


function del(id) {
	if(confirm('你确定要删除吗？')) {
		window.location.href = "/wgcloud/dceInfo/del?id=" + id;
	}
}
function edit(id){
	window.location.href = "/wgcloud/dceInfo/edit?id="+id;
}

function importHosts() {
	if(confirm('你确定要将所有监控主机导入到数通设备吗？')) {
		toastr.success("正在将所有监控主机导入到数通设备……");
		$.ajax({
			url: "/wgcloud/dceInfo/importHosts",
			//data: {},
			type: "GET",
			//dataType: "json",
			success: function (data) {
				toastr.success("导入完成，请刷新页面");
			}
		});
	}
}

function cancel(){
	history.back();
}
